package com.example.demo.dao;

import com.example.demo.entity.CourseChapterBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseChapterDao {
    
    List<CourseChapterBean> getAll();
    
    Integer insert(CourseChapterBean courseChapterBean);
    
    Integer edit(CourseChapterBean courseChapterBean);
    
    Integer del(Integer id);
    
    CourseChapterBean getOne(Integer id);
    
    List<CourseChapterBean> getByCourseId(Integer courseId);
    
    List<CourseChapterBean> getPage(
            @Param("jump") Integer jump,
            @Param("pageSize") Integer pageSize,
            @Param("name") String name,
            @Param("courseId") Integer courseId,
            @Param("sortOrder") String sortOrder
    );
    
    Integer getCount(
            @Param("name") String name,
            @Param("courseId") Integer courseId
    );
}
